


*******************************Table B1***********************************************
*******************************Table B1***********************************************
*******************************Table B1***********************************************



cd "D:\Nanjing\2020\wage gap\Replication"   
use "labor-basic-tpu-reg-1.dta",clear
gen VMPK=capitale*(y_ind_add1/k)

*drop if VMPK<0

/*
* distribution of VMPK
twoway (kdensity VMPK if VMPK<5.3, color(red)),  xtitle(VMPK) ytitle(Distribution)
graph export "D:\Nanjing\2020\wage gap\RR\results\VMPK_dist.eps",replace
*/

gen prov=province
/*
gen prov_name=""
replace prov_name="北京" if prov==11
replace prov_name="上海" if prov==31
replace prov_name="内蒙" if prov==15
replace prov_name="山西" if prov==14
replace prov_name="重庆" if prov==50
replace prov_name="天津" if prov==12
replace prov_name="河北" if prov==13
replace prov_name="辽宁" if prov==21

replace prov_name="吉林" if prov==22
replace prov_name="黑龙江" if prov==23
replace prov_name="江苏" if prov==32
replace prov_name="安徽" if prov==34
replace prov_name="山东" if prov==37
replace prov_name="浙江" if prov==33
replace prov_name="江西" if prov==36
replace prov_name="福建" if prov==35

replace prov_name="湖南" if prov==44
replace prov_name="湖北" if prov==42
replace prov_name="河南" if prov==41
replace prov_name="广东" if prov==44
replace prov_name="广西" if prov==45
replace prov_name="贵州" if prov==52
replace prov_name="海南" if prov==46
replace prov_name="四川" if prov==51

replace prov_name="云南" if prov==53
replace prov_name="陕西" if prov==61
replace prov_name="甘肃" if prov==62
replace prov_name="宁夏" if prov==64
replace prov_name="青海" if prov==63
replace prov_name="新疆" if prov==65
replace prov_name="西藏" if prov==54
*/
*drop if VMPK<0
gen region=.					
					
replace region=	1		 if prov==		11
replace region=	1		 if prov==		12
replace region=	1		 if prov==		13
replace region=	2		 if prov==		14
replace region=	2		 if prov==		15
replace region=	1		 if prov==		21
replace region=	2		 if prov==		22
replace region=	2		 if prov==		23
replace region=	1		 if prov==		31
replace region=	1		 if prov==		32
replace region=	1		 if prov==		33
replace region=	2		 if prov==		34
replace region=	1		 if prov==		35
replace region=	2		 if prov==		36
replace region=	1		 if prov==		37
replace region=	2		 if prov==		41
replace region=	2		 if prov==		42
replace region=	2		 if prov==		43
replace region=	3		 if prov==		44
replace region=	2		 if prov==		45
replace region=	1		 if prov==		46
replace region=	3		 if prov==		50
replace region=	3		 if prov==		51
replace region=	3		 if prov==		52
replace region=	3		 if prov==		53
replace region=	1		 if prov==		54
replace region=	3		 if prov==		61
replace region=	3		 if prov==		62
replace region=	3		 if prov==		63
replace region=	3		 if prov==		64
replace region=	3		 if prov==		65

*1. generate capital category:
bysort id: gen indc_n=_n==1
gen m_k=k if indc_n==1
bysort id: egen M_k=max(m_k)

egen p1=pctile(M_k), p(25)
egen p2=pctile(M_k), p(50)
egen p3=pctile(M_k), p(75)
egen p4=pctile(M_k), p(95)
gen size_k=0
replace size_k=1 if M_k<=p1
replace size_k=2 if M_k>p1&M_k<p2
replace size_k=3 if M_k>p2&M_k<p3
replace size_k=4 if M_k>p3&M_k<p4
replace size_k=5 if M_k>p4

*2. generate average rental rate in each category:

bysort province ind4_adj QiuType size_k t: egen r_rate=mean(VMPK)



* 3. gap measured in capital:

gen gdp_def=1
replace gdp_def=1.077 if t==1999
replace gdp_def=1.077*1.085 if t==2000
replace gdp_def=1.077*1.085*1.083 if t==2001
replace gdp_def=1.077*1.085*1.083*1.091 if t==2002
replace gdp_def=1.077*1.085*1.083*1.091*1.10 if t==2003
replace gdp_def=1.077*1.085*1.083*1.091*1.10*1.101 if t==2004
replace gdp_def=1.077*1.085*1.083*1.091*1.10*1.101*1.114 if t==2005
replace gdp_def=1.077*1.085*1.083*1.091*1.10*1.101*1.114*1.127 if t==2006
replace gdp_def=1.077*1.085*1.083*1.091*1.10*1.101*1.114*1.127*1.142 if t==2007



gen gap_k=VMPK-r_rate
gen abs_G_k=abs(r_rate)

replace abs_G_k=abs_G_k/gdp_def

replace size_k=1 if size_k==0
egen quantile=group(size_k)



cap drop ub_k
 egen ub_k=pctile(abs_G_k), p(99.5)
 
 
 
 ***************************Results*********************************************
 
 *-----------------------------------------
 *1.  panel A: by size quantile
 *-------------------------------------------
 
bysort quantile: sum  abs_G_k if abs_G_k<ub_k



 *-----------------------------------------
 *2.  panel B: by ownership
 *-------------------------------------------
 

cap drop Type
gen Type=0
replace Type=1 if owner==1|owner==2|Type==0
replace Type=2 if owner==4|owner==7|owner==3
replace Type=3 if QiuType==3


bysort Type:sum  abs_G_k if abs_G_k<ub_k

* note: Type=1 SOEs; Type=2 Private; Type=3 Foreign


 *-----------------------------------------
 *3.  panel C: by Province
 *-------------------------------------------
 


bysort region:sum  abs_G_k if abs_G_k<ub_k

* note: region=1 East, region=2 Central, region=3 West





 *-----------------------------------------
 *4.  panel D and E: by industries
 *-------------------------------------------
 

gen cic2=floor(ind4_adj/100)
bysort cic2: sum  abs_G_k if abs_G_k<ub_k

* note high and low industries
* H: Electric component41(0.944), Non-Ferrous metal smelt33(0.704), tabacco processing16(0.579), chemical materials26(0.560), education and sport product24(0.542);
* L: printing, tap, and file prod23(0.263), chemical fiber28(0.271), paper and paper pulp22(0.273), Beverage manu15(0.273), special equipment35(0.306);


*--------------------------------------------------------------------------------
